package com.edu.study.base.rest;

import com.edu.study.base.tbVideoConfig.domain.TbVideoConfig;
import com.edu.study.base.tbVideoConfig.service.ITbVideoConfigService;
import com.ruoyi.common.core.domain.AjaxResult;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "2、视频管理接口")
@RestController
@RequestMapping("/api/video")
public class AppVideoConfigController {

    @Autowired
    private ITbVideoConfigService tbVideoConfigService;


    @ApiOperation("获取视频数据")
    @GetMapping("/list")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "position",value = "视频位置",required = false),
            @ApiImplicitParam(name = "type",value = "视频类型",required = false),

    })
    public AjaxResult getVideoConfig(String position,String type){
        TbVideoConfig tbVideoConfig = new TbVideoConfig();
        tbVideoConfig.setvPosition(position);
        tbVideoConfig.setvPosition(type);
        List<TbVideoConfig> list = tbVideoConfigService.selectTbVideoConfigList(tbVideoConfig);
        return AjaxResult.success(list);
    }
}
